<template>

  <common_print_dialog ref="common_print_dialog" businessType="PRE_PARCEL" v-bind="$attrs" v-on="$listeners"
  :formModel="[{ label: 'label_destination_warehouse', key: 'destinationWarehouseName', type: 'text', },]" 
    generateUrl="/wms-api/inbound/WmsInboundTransitPackagingRpc/generateBatchPackageNo.json" 
    printUrl="/wms-api/inbound/WmsInboundTransitPackagingRpc/print.json" :printHandler="(data, list) => {
     return {
        clientName: data.clientName,
        printDetailList: list.map(it => {
          return {
            printType: data.type,
            templateId: data.templateId,
            printNum: it.printNum,
            fileType: data.fileType,
            packageNo: it,
            targetWarehouse: data.destinationWarehouseName,
          }
        })
      }
    }" previewUrl="/wms-api/inbound/WmsInboundTransitPackagingRpc/preview.json" :previewHandler="(data, code) => {
      data.printType = data.type;
  data.packageNo = data.generateData;
  data.targetWarehouse = data.destinationWarehouseName;
  return data
}" />
</template>

<script>
import common_print_dialog from './common_print_dialog.vue'
export default {
  components: { common_print_dialog },
  data() {
    return {

    }
  },
  methods: {

    show(rows) {
      this.$refs.common_print_dialog.show(rows)
    },



  }
}
</script>
